<style lang="scss" scoped>
.infosend-goven {
  margin-top: 1.25rem;
}
.infosend-module .title span {
  font-size: 16px;
}
.infosend-module .table-show table td.audit-ctc {
  height: auto;
  padding: 0.25rem 0;
}
.infosend-module:last-child {
  margin-bottom: 1.5rem;
}
.operation {
  border: none;
  position: fixed;
  padding: 0;
  margin: 0;
  width: 100%;
  bottom: 0.25rem;
  .button {
    margin: 0 0.4rem;
  }
}
</style>

<template>
    <div>
        <headTop :theRouter="therouter"></headTop>
        <div class="infosend-goven fn-clear">
            <div class="img-show">
                <img v-if="detailList.img_name!=='' && detailList.img_name!=='undefined'" :src="'../../../static/img/'+detailList.img_name" alt="">
                <img v-else src="../../../static/img/no-img.png" alt="">
            </div>
            <div class="goven-info">
                <div class="goven-info-title">{{detailList.hy_name}}</div>
                <div class="goven-info-ctc">申请原因：{{detailList.application}}</div>
                <div class="goven-info-ctc">申请人：{{detailList.applicant}}</div>
            </div>
        </div>
        <div class="infosend-module">
            <div class="title fn-clear">
                <i class="icon2"></i>
                <span>申请信息</span>
            </div>
            <div class="table-show">
                <table>
                    <tbody>
                        <tr>
                            <td class="column">电站位置</td>
                            <td class="ctc">{{detailList.hy_location}}</td>
                        </tr>
                        <tr>
                            <td class="column">申请开始时间</td>
                            <td class="ctc">{{detailList.start_time}}</td>
                        </tr>
                        <tr>
                            <td class="column">申请结束时间</td>
                            <td class="ctc">{{detailList.end_time}}</td>
                        </tr>
                        <tr>
                            <td class="column">申请时间</td>
                            <td class="ctc">{{detailList.apply_time}}</td>
                        </tr>
                        <tr>
                            <td class="column">申请状态</td>
                            <td class="ctc">
                                <span v-show="detailList.status==0">待审核</span>
                                <span v-show="detailList.status==1">审核通过</span>
                                <span v-show="detailList.status==2">审核不通过</span>
                                <span v-show="detailList.status==3">草稿</span>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="infosend-module" v-show="detailList.status!=0">
            <div class="title fn-clear">
                <i class="icon2"></i>
                <span>审核信息</span>
            </div>
            <div class="table-show">
                <table>
                    <tbody>
                        <tr>
                            <td class="column">审核人员名称</td>
                            <td class="ctc">{{detailList.auditor_name}}</td>
                        </tr>
                        <tr>
                            <td class="column">审核时间</td>
                            <td class="ctc">{{detailList.audit_time}}</td>
                        </tr>
                        <tr>
                            <td class="column">审核内容</td>
                            <td class="ctc audit-ctc">{{detailList.audit_content}}</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="operation" v-show="detailList.status==0" @click="audit">
            <div class="button">审核</div>
        </div>
    </div>
</template>
<script>
import { BASEURL } from "./../../api/api"
import axios from "axios"
import headTop from "./../common/header"
export default {
  name: "infodetail",
  components: {
    headTop
  },
  computed: {
    therouter: function() {
      return this.$route;
    }
  },
  mounted() {
    //初始化详情
    this.init();
  },
  data() {
    return {
      detailList: {}
    };
  },
  methods: {
    init() {
      let _self = this;
      axios.get(BASEURL + "getApply", {
          params: {
            applyId: _self.$route.query.applyId
          }
        }).then(res => {
            console.log(res.data)
          _self.detailList = res.data.apply
        }).catch(error => {
          console.log(error);
        });
    },
    audit() {
      let _self = this;
      _self.$router.push({ path: "/cutoffwateraudit",query: {
          applyId:_self.$route.query.applyId
      } });
    }
  }
};
</script>

